{extend name="base" /}
{block name="body"}
<header class="hui-header">
    <div id="hui-back"></div>
    <h1 style="color:#3f3f3f"></h1>
    <div id="hui-header-menu"  onclick="hui.showSlideMenu();"></div>
</header>
<input id="nowTime" type="hidden" value="{$now}">
<input id="endTime" type="hidden" value="{$exam['examsetting']['starttime']}">
<input id="id"  type="hidden" value="{:hashids_encode($info['id'])}">
<input id="type" type="hidden" value="{:hashids_encode($info['coursetype'])}">
<input id="useType" type="hidden" value="{$useType}">
<div class="hui-wrap mb52">
    <div class="exam-preview">
        <div class="title">{$title}</div>
        <div class="detail">
            <ul>
                <li> <span class="tag">试卷满分</span><span class="content">{$exam['examsetting']['examscore']}分</span></li>
                <li> <span class="tag">考试时间</span><span class="content">{$exam['examsetting']['examtime']}分钟</span></li>
                {if condition="$exam['examsetting']['starttime']"}
                <li> <span class="tag">开考时间</span><span class="content">{$exam['examsetting']['starttime']}</span></li>
                {/if}
            </ul>
        </div>
        {if condition="$exam['examsetting']['starttime']"}
        {if condition="$useType==5"}
        <div class="daojishi">
            <span class="tag">你来晚了，考试已经结束了！</span>
        </div>
        {else /}
        <div class="daojishi">
            <span class="tag">离考试开始还剩：</span><span id="remain" class="time"></span>
        </div>
        {/if}
        {if condition="$myexam['ispost']==0"}
        <div class="daojishi mt20">
            <a type="button" id="startexam" class="layui-btn layui-btn-primary" href="javascript:void(0)">开始考试</a>
        </div>
        {else /}
        <div class="daojishi mt20">
            <a type="button"  class="layui-btn" href="{:url('index/Course/learn',['exam'=>'formal','id'=>hashids_encode($info['id']),'type'=>hashids_encode($info['coursetype'])])}">查看试卷</a>
        </div>
        {/if}
        {else /}
        <div class="daojishi mt20">
            <a type="button" class="layui-btn" href="{:url('index/Course/learn',['exam'=>'formal','id'=>hashids_encode($info['id']),'type'=>hashids_encode($info['coursetype'])])}">开始考试</a>
        </div>
        {/if}
    </div>
</div>
{/block}
{block name="foot"}
{/block}
{block name="js"}
<script src="__HUI__/js/hui-tab.js"></script>
<script src="__HUI__/js/hui-accordion.js"></script>
{/block}